home *** CD-ROM | disk | FTP | other *** search
/ Experimental BBS Explossion 3 / Experimental BBS Explossion III.iso / graphics / dmorf_1.zip / MAKEMORF.TXT < prev    next >
Text File  |  1993-04-15  |  13KB  |  255 lines

  1.                         MORPH MAKING TUTORIAL
  2.  
  3.         Featuring Dave Mason's DMORF and DTA Shareware Programs
  4.  
  5.       For more information, visit the GRAPHDEV forum on CompuServ
  6.  
  7.  
  8. Morph, as in MetaMORPHosis, is the process by which one image
  9. smoothly melds into another image. The process is used in movies,
  10. television and commercials but until recently could only be done by
  11. people with special hardware and software. Today, given the power of
  12. PCs and the imagination and creativity of artists, mathematicians,
  13. and programmers, you'll be able to Morph between any two images you
  14. happen to have. Although the effect is normally done with faces, you
  15. can use anything you like. Car commercials often Morph from one model
  16. year to the next.
  17.  
  18. This tutorial explains the steps required to MORPH two images using
  19. two excellent shareware programs by Dave Mason. The first one, DMORF
  20. (Dave's Morph), is used to specify how the morph should look. It will
  21. generate as many frames (image files) as you ask it to, with each one
  22. showing a greater change from the first image to the second one. For
  23. example, if we're morphing a picture of you at age ten to you at age
  24. twenty and specify a 10 frame morph, then the first frame should
  25. resemble you at age 11, the next at age 12, until you reach 20. (This
  26. really works...). Anyway, when DMORF is done, you'll have 10 Targa
  27. files named MORF0001.TGA through MORF0010.TGA (although you can change
  28. these names). The next thing you'll do is run DTA (Dave's Targa
  29. Animator) which will combine the .TGA files into a single .FLI file
  30. which will default to the name ANIM.FLI. Finally, you'll run 
  31.  
  32. PLAY ANIM.FLI 
  33.  
  34. and watch yourself grow old. It's that simple!
  35.  
  36. Before going any further, read the file named DMORF.DOC. It explains
  37. how to install DMORF and the basics of how to use it. It also explains
  38. that these programs are SHAREWARE and that it's socially acceptable to
  39. pay for them if you like them. Let your conscience be your guide. Once
  40. you know it's installed correctly, come back here and we'll start
  41. morphing.
  42.  
  43. We're going to try two different morphs using the sample files that
  44. came with the tutorial. In the first lesson, we'll morph The
  45. Terminator into Lieutenant Warf. (An ENFORCER Morph). In this morph
  46. the faces line up fairly well, which greatly simplifies things. In
  47. our second lesson, we'll have to work harder to get the right effect.
  48.  
  49. Keep in mind that MORPHING IS ART - NOT SCIENCE! No two morphs look
  50. alike whether they're done by the same artist or different artists.
  51. Also, what might appear like a mistake when you're doing it can often
  52. turn into a great new effect you hadn't though of before. Just relax,
  53. have fun, and use your RIGHT BRAIN.
  54.  
  55. LESSON 1:       Arnold -> Warf
  56.  
  57. You'll find several Targa (.TGA) files on the disk. We'll be using
  58. ARNOLD.TGA (Terminator) and WARF.TGA (Lieutenant Warf). In case
  59. you're curious, ARNOLD was captured from video tape using a
  60. VideoSpigot from Creative Labs. WARF started out as a GIF file. Both
  61. images were scaled to 240x180 and their backgrounds were removed
  62. using Corel PhotoPaint.
  63.  
  64. THINGS TO KNOW:
  65.  
  66. 1.      ALWAYS make the images the same size!!! 
  67. 2.      Removing the background results in MUCH better morphs. If you
  68.         don't, the backgrounds morph too.
  69.  
  70. OK. Start Dave's Morphing Program with the BEFORE and AFTER images by
  71. typing:
  72.  
  73. DMORF ARNOLD.TGA WARF.TGA
  74.  
  75. This will load ARNOLD as the BEFORE Image and WARF as the AFTER
  76. Image.  Don't worry if they come up in Black & White, they're full 24
  77. bit color images and the output images will be too. The buttons on
  78. the bottom of the screen are explained in the DMORF.DOC file so we'll
  79. just concentrate on building a mesh.
  80.  
  81. What's a Mesh? Before I answer that, let's look at how Morphing
  82. works. Deep inside DMORF is a Pixel Interpolator. It knows how to
  83. interpolate pixels from Point A to Point B as well as how to
  84. interpolate the color of the resulting pixel as it approaches Point
  85. B. The only thing it doesn't know is which points you would like
  86. interpolated where. If you told it absolutely nothing, it would move
  87. the point 1,1 in Image A to the point 1,1 in Image B and so on.  This
  88. would result in a much simpler effect known as a dissolve, where the
  89. colors from Image A slowly give way to the colors in Image B.
  90. Obviously that's no fun. We want Image A to slowly distort both its
  91. shape AND its color until it actually BECOMES Image B.  We'll do this
  92. by specifying the KEY Points on Image A which are to migrate to Image
  93. B. If we specify enough of them, DMORF will be able to interpolate
  94. between them and give us a professional quality morph.
  95.  
  96. Now, what's a Mesh? A mesh is a series of vertical lines which
  97. intersect a series of horizontal lines. The points at which they
  98. intersect are the mesh points. We'll be drawing a mesh on ARNOLD and
  99. on WARF such that each intersection (mesh point) represents a pixel
  100. that we would like to migrate.
  101.  
  102. Before we go any further - when I talk about ARNOLD's LEFT EYE, I
  103. mean the one on YOUR LEFT not ARNOLD's left (It's really ARNOLD's
  104. right eye, but he's not here to argue right now).
  105.  
  106. Note that there is a frame around each of the images. Let's begin by
  107. positioning the mouse on the frame directly below ARNOLD and under
  108. his LEFT eye. Click the RIGHT mouse button. You should see a red
  109. vertical line running through (or nearly through, depending on your
  110. aim) his left eye. If not, you're not on the frame. Find the frame
  111. around the image and try again. Remember to use the RIGHT button. Now
  112. position the mouse on the frame to the left or right of ARNOLD but
  113. lined up with the center of his left eye again. Click the RIGHT
  114. button and you should now have a horizontal line crossing a vertical
  115. line in ARNOLD's left eye. That's a mesh point.
  116.  
  117. If you look over at WARF you'll see his mesh point. This is the same
  118. physical coordinate as the one on ARNOLD and is where ARNOLD's eye
  119. would end up if we weren't here to intervene. Since we don't want his
  120. eye on WARF's forehead, place the mouse over the mesh point on WARF,
  121. press the LEFT button and drag it to the center of WARF's left eye.
  122. By the way, if you missed ARNOLD's eye before, you can move the mesh
  123. point on his picture too. It doesn't matter which side you add the
  124. points and where you move them. When you're done, DMORF simply takes
  125. each intersection, reading from left to right, top to bottom, and
  126. matches it with the intersection on the other image. It then
  127. interpolates pixels and colors so that they migrate toward these
  128. points.  Everything else just flows along. What you CAN'T DO, is let
  129. these lines cross each other. DMORF will try to prevent this, but if
  130. you trick it, don't be too proud of yourself - it will blow up later.
  131. All this means is that you need to think out your work a little
  132. before you start. The other thing you should do is save the mesh
  133. points frequently. Press the SAVE button and type something like
  134. STEP1.MSH and so on until you finish.
  135.  
  136. You now know everything there is to know (about morphing). You
  137. probably don't believe that so I'll go right on talking. The point
  138. is, once you specify the key points, DMORF is ready to interpolate.
  139. As I said before, the more you specify, the better the morph.
  140.  
  141. Now let's do the RIGHT eye. Place a vertical line on either picture
  142. that you like and then drag the mesh points to the center of each
  143. guy's RIGHT eye. The next thing I'd do is add a point at the corner
  144. of one of the mouths and then move the corresponding point on the
  145. other face. You might want to add some points outlining ARNOLD's
  146. glasses and make these match WARF's eyes. 
  147.  
  148. By now you've probably noticed that the lines are no longer
  149. perpendicular. As I said earlier, Morphing is Interpolating. The
  150. lines constantly interpolate to follow the flow of the mesh points.
  151. If you haven't already done so, try pressing and holding the SPLINE
  152. button. If you have the SPLINE MESH box checked when you generate the
  153. morph, the splines will actually look like this to the pixel
  154. interpolator. Sometimes these splines will appear to "go nuts". As
  155. you add more lines, this often tends to correct itself. 
  156.  
  157. Save your work now by pressing the SAVE button and coming up with a
  158. creative name other than LESS1_1 (or anything like that). Make sure
  159. you give it a .MSH extension. Now press the LOAD button and retrieve
  160. LESS1_1. That's what I created. It's probably different but similar
  161. to yours. What's wild is that those (minor?) differences will result
  162. in a completely different morph.
  163.  
  164. You can load my LESS1_2 through LESS1_4 files to get an idea of the
  165. steps I took with this morph. I tend to work my way out from the
  166. eyes, nose and mouth to the ears, hairline, chin, cheeks and then
  167. down to the neck and shoulders. Feel free to experiment.
  168.  
  169. In LESS1_2 I've begun to outline the hairline and right side of the
  170. head. By LESS1_3, I've finished the facial features. LESS1_4 seems
  171. like a big step but all I've really done is click the mouse along the
  172. frame in the areas in between where I was working to fill in the
  173. gaps. DMORF did all the line bending. You can almost see how the
  174. faces will warp now (if you know what to look for - you will after a
  175. while).
  176.  
  177. Let's leave my LESS1_4 loaded and generate the morph. Then you can go
  178. back to your version later and try it yourself.
  179.  
  180. In the middle of the screen on the bottom are some controls relating
  181. to the number of frames to generate. I usually generate 20 frames
  182. when I'm experimenting. The more you generate, the smoother the
  183. morph. Television is 30 frames per second. If you're going to put the
  184. results on videotape, you can figure out how many frames based on how
  185. long the sequence should last. Anyway, scroll the FRAMES value to 20.
  186. You'll notice that the LAST FRAME value follows along. You can set
  187. the START and LAST frames independently, which allows you to generate
  188. individual frames in the middle of the morph if you like.
  189.  
  190. If you look in the lower right corner, you'll see the word MORF. You
  191. can change this to any 4 characters you like. The way DMORF uses this
  192. is to generate output files using those 4 characters plus a 4 digit
  193. frame number, ie. MORF0001.TGA, MORF0002.TGA, etc. Leave it alone for
  194. now and lets generate a morph. 
  195.  
  196. PRESS GO.
  197.  
  198. If you weren't sure if your machine had a math coprocessor, here's
  199. how to find out: If you see percentage figures flying by, you've got
  200. one, otherwise, you might as well go take in a good movie (or get a
  201. good night's sleep) 'cause this is gonna take a while.
  202.  
  203. Otherwise, in 5 or 10 minutes we'll be ready to take the next step.
  204.  
  205. PRESS QUIT.
  206.  
  207. You're back to DOS. Now if you do a DIR MORF*.TGA you'll see the
  208. results. Now we need to assemble these into a .FLI file so we can see
  209. the animation. (Actually, you may have Presentation software that
  210. will assemble these in some playable format too). To make a .FLI
  211. we'll use Dave's TARGA Animator - DTA.
  212.  
  213. The frames we generated did not include the starting and ending
  214. frames since we already had these. Run DTA by typing
  215.  
  216. DTA ARNOLD.TGA MORF*.TGA WARF.TGA /P /S3
  217.  
  218. This will assemble the files (in this order) into a .FLI file called
  219. ANIM.FLI. You can override this if you checkout the DTA.DOC file. I
  220. leave it this way so that I can keep replacing ANIM.FLI with other
  221. tries until I like the result. Then I rename it to something more
  222. distinctive. The /P parameter causes a Ping-Pong effect which you'll
  223. like. The /S3 parameter sets the playback speed to 3. You can
  224. experiment with this if you like.
  225.  
  226. Now run
  227.  
  228. PLAY ANIM.FLI
  229.  
  230. How's that? If it's too fast (or slow), the number keys across the
  231. top of the keyboard can be used to change the speed. Press ESC when
  232. you're done.
  233.  
  234. CONGRATULATIONS! George Lucas has an opening but you'll probably have
  235. to relocate.
  236.  
  237. OK. Let's do an "alien morph". We'll start with Mr. Spock and end with
  238. ET! When we're done, you'll realize that all aliens look alike.
  239.  
  240. Start DMORF by typing:
  241.  
  242. DMORF SPOCK.TGA ET.TGA
  243.  
  244. As you examine the meshes for this one, you'll see that quite a bit
  245. more stretching of the mesh points is necessary to get the right
  246. effect. Proceed as you did in the first lesson. You'll probably want
  247. to load LESS2_1 through LESS2_4 to study the way I did it and then
  248. try it yourself. When you're done, you'll have my favorite morph.
  249.  
  250. Feel free to use CompuServ - GO GRAPHDEV - if you need help. The
  251. authors as well as many users spend their evenings there. Hope to see
  252. you there....
  253.  
  254. Ken
  255.